#!/bin/bash
#
#
COMPRESS_PATH=~/BelRusProjetcts/libs/compress

echo "compress *.js and *.css for compuvest.com and compuvestb2b.com -> apache2/htdocs/jss"

#----------------MooTools---------------------
#
# Date.js,
# Date.Extras.js,
# String.QueryString.js
# URI.js
# Hash.js
# Fx.Slide.js
# Drag.js,
# Drag.Move.js,
# Date.English.US.js
#
#cat ./mootools-core-1.4.2-full-nocompat.js ./mootools-more-1.4.0.1.js > temp.js
#/usr/bin/java -classpath $COMPRESS_PATH/rhino-1.6R7.jar \
#              -classpath $COMPRESS_PATH/jargs-1.0.jar \
#              -jar $COMPRESS_PATH/yuicompressor-2.4.2.jar \
#              -o ./moo.js ./temp.js

#cp ./moo.js ../../js/moo.js
#rm ./temp.js
#echo "moo.js Done"

#-------------------------------------
# js
/usr/bin/java -classpath $COMPRESS_PATH/rhino-1.6R7.jar \
              -classpath $COMPRESS_PATH/jargs-1.0.jar \
              -jar $COMPRESS_PATH/yuicompressor-2.4.2.jar \
              -o ../../js/cvm.js ./cvm.js

#cp ./cvm.js ../../js/cvm.js

echo "*.js Done"

#-------------------------------------
# css
/usr/bin/java -classpath $COMPRESS_PATH/rhino-1.6R7.jar \
              -classpath $COMPRESS_PATH/jargs-1.0.jar \
              -jar $COMPRESS_PATH/yuicompressor-2.4.2.jar \
              -o ../../css/cv.css ./cv.css

#cp ./temp.css ../../css/cv.css

echo "*.css Done"

#-------------------------------------
exit 0
